package com.burstly.lib.feature;

import android.content.Context;
import com.h2.org.springframework.beans.Bean;
import com.h2.org.springframework.beans.factory.IResourceManager;
import com.h2.org.springframework.beans.factory.SimpleBeanFactory;
import java.util.Map;
import org.springframework.beans.BeansException;
import org.springframework.context.support.ClassPathXmlApplicationContext;

final class LazyXmlApplicationContext extends ClassPathXmlApplicationContext
{
  private final SimpleBeanFactory mBeanFactory;
  private final ResourceManager mResManager;

  LazyXmlApplicationContext(Context paramContext, String paramString)
  {
    this.mResManager = new ResourceManager(paramContext.getAssets());
    this.mBeanFactory = new SimpleBeanFactory();
    setBeanFactory(this.mBeanFactory);
    processContext(paramString);
  }

  public <T> T getBean(String paramString, Class<T> paramClass)
    throws BeansException
  {
    Object localObject = super.getBean(paramString, paramClass);
    Map localMap = getBeanPreProcess();
    if (localObject == null)
    {
      Bean localBean = (Bean)localMap.get(paramString);
      if (localBean != null)
      {
        processBean(this.mBeanFactory, localBean);
        processInnerBean(this.mBeanFactory, localBean);
        localObject = getBean(paramString, paramClass);
      }
    }
    while ((localObject == null) || (!localMap.containsKey(paramString)))
      return localObject;
    localMap.remove(paramString);
    return localObject;
  }

  public IResourceManager getResorceManager()
  {
    return this.mResManager;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.burstly.lib.feature.LazyXmlApplicationContext
 * JD-Core Version:    0.6.2
 */